<?php
//微信信息发送类
class WinxinMessAction extends CommonAction{
	//初始页面
	public function index(){
		/*Vendor('Weixin.Weixin');
		$d['token']=getSysVal('token');
        $d['appid']=getSysVal('appid');
        $d['appsecret']=getSysVal('appsecret');
        $this->weixin=new WeixinChat($d);*/
	/*	
		$code = $_GET['code'];//获取code
		$weixin =  file_get_contents( "https://api.weixin.qq.com/sns/oauth2/access_token?appid=$d['appid']&secret=$d['appsecret']&code=".$code. "&grant_type=authorization_code");//通过code换取网页授权access_token
		$jsondecode = json_decode($weixin); //对JSON格式的字符串进行编码
		$array = get_object_vars($jsondecode);//转换成数组
		$openid = $array['openid'];//输出openid
		$marking = $this->weixin->sendCustomMessage($openid,'微信信息测试');
		
		echo $jsondecode;*/
		$this->display();
	}		
}